package com.edu.service.impl;

import java.util.List;

import com.edu.bean.Cardetails;
import com.edu.bean.Comment;
import com.edu.bean.Page;
import com.edu.dao.impl.CardetailsDaoImpl;
import com.edu.dao.CardetailsDao;
import com.edu.service.CardetailsService;

public class CardetailsServiceImpl implements CardetailsService {
	CardetailsDao cd = new CardetailsDaoImpl();
	@Override
	public Page<Cardetails> selectCommentAll(Cardetails car, int pageNum, int pageSize) {
		List<Cardetails> Cardetails = cd.selectCommentAll(pageNum, pageSize);
		int row = cd.selectCardetailstotal(car);
		Page<Cardetails> page = new Page(Cardetails,pageNum,pageSize,row);
		return page;
	}

	@Override
	public int deleteCardetailsById(int id) {
		// TODO Auto-generated method stub
		return cd.deleteCardetailsById(id);
	}

	@Override
	public int updateCardetails(Cardetails id) {
		// TODO Auto-generated method stub
		return cd.updateCardetails(id);
	}

	@Override
	public Cardetails selectCardetailsById(int id) {
		// TODO Auto-generated method stub
		return cd.selectCardetailsById(id);
	}

	@Override
	public int addCardetails(Cardetails cardetails) {
		// TODO Auto-generated method stub
		return cd.addCardetails(cardetails);
	}

}
